﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BooksAPI
{
    public class DBFactory
    {
        public static string ConnStr = "server=.;database=WebMarket;user=sa;pwd=qswangyun;";

        public static SqlSugarClient DefaultDbContext
        {
            get
            {
                return new SqlSugarClient(new ConnectionConfig
                {
                    DbType = DbType.SqlServer,
                    InitKeyType = InitKeyType.SystemTable,
                    IsAutoCloseConnection = true,
                    ConnectionString = ConnStr
                });
            }
        }
    }
}